# import re
#
# s = '''
# <body>
# <h1>标题问题内容</h1>
# <h3 class="abc">我字体大小16px,去掉加粗</h3>
# </body>
# '''
#
# result = re.findall(r'<h1>(.*)</h1>[\s\S]*<h3.*>(.*)</h3>', s)
# print(result[0][0])
# print(result[0][1])

import re

s = '''
<body>
<h1>标题问题内容</h1>
<h3 class="abc">我字体大小16px,去掉加粗</h3>
</body>
'''

result = re.search(r'<h1>(?P<h1>.*)</h1>[\s\S]*<h3.*>(?P<h3>.*)</h3>', s)
print(result.group('h1'))
print(result.group('h3'))
